package com.tjf.lib_utils.bean;


import java.io.Serializable;

/**
 * @author: tjf
 * @date: 2023-06-20
 * @desc： EventBus事件类
 */
public class BusEvent<T> implements Serializable {

    /**
     * 事件
     */
    private String action;
    /**
     * 事件状态 0成功 1 失败
     */
    private int actionStatus;
    /**
     * 事件状态 0成功 1 失败
     */
    private String msg;
    /**
     * 事件附带数据
     */
    private T data;

    public BusEvent(String action) {
        this.action = action;
    }

    public BusEvent(String action, T data) {
        this.action = action;
        this.data = data;
    }

    public BusEvent(String action, int actionStatus, T data) {
        this.action = action;
        this.actionStatus = actionStatus;
        this.data = data;
    }

    public BusEvent(String action, int actionStatus, String msg, T data) {
        this.action = action;
        this.actionStatus = actionStatus;
        this.msg = msg;
        this.data = data;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public int getActionStatus() {
        return actionStatus;
    }

    public void setActionStatus(int actionStatus) {
        this.actionStatus = actionStatus;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
